<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Redhat 7 操作系统密码策略 | Yadedoo的文库</title>
    <meta name="generator" content="VuePress 1.9.7">
    <link rel="icon" href="img/favicon.ico">
    <meta name="description" content="Yadedoo的文库, 干货满满!">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    
    <link rel="preload" href="/assets/css/0.styles.7c47a738.css" as="style"><link rel="preload" href="/assets/js/app.6ab793bd.js" as="script"><link rel="preload" href="/assets/js/2.c1834578.js" as="script"><link rel="preload" href="/assets/js/10.551bf274.js" as="script"><link rel="prefetch" href="/assets/js/11.540b7b96.js"><link rel="prefetch" href="/assets/js/12.a8e99ea1.js"><link rel="prefetch" href="/assets/js/3.a804e91d.js"><link rel="prefetch" href="/assets/js/4.9585a2a2.js"><link rel="prefetch" href="/assets/js/5.946e4cc7.js"><link rel="prefetch" href="/assets/js/6.7fa5827e.js"><link rel="prefetch" href="/assets/js/7.cea1c6b4.js"><link rel="prefetch" href="/assets/js/8.dbb894b8.js"><link rel="prefetch" href="/assets/js/9.801c7b56.js">
    <link rel="stylesheet" href="/assets/css/0.styles.7c47a738.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">Yadedoo的文库</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="数据平台" class="dropdown-title"><!----> <span class="title" style="display:;">数据平台</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/0ff3bc/" class="nav-link">机器学习</a></li></ul></div></div><div class="nav-item"><a href="/pages/3da17e/" class="nav-link">系统架构</a></div><div class="nav-item"><a href="/pages/3da17e/" class="nav-link">技术开发</a></div><div class="nav-item"><a href="/pages/85e331/" aria-current="page" class="nav-link router-link-exact-active router-link-active">操作系统</a></div><div class="nav-item"><a href="/pages/aa3ff7/" class="nav-link">数据库</a></div><div class="nav-item"><a href="https://baidu.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  External
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="数据平台" class="dropdown-title"><!----> <span class="title" style="display:;">数据平台</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/0ff3bc/" class="nav-link">机器学习</a></li></ul></div></div><div class="nav-item"><a href="/pages/3da17e/" class="nav-link">系统架构</a></div><div class="nav-item"><a href="/pages/3da17e/" class="nav-link">技术开发</a></div><div class="nav-item"><a href="/pages/85e331/" aria-current="page" class="nav-link router-link-exact-active router-link-active">操作系统</a></div><div class="nav-item"><a href="/pages/aa3ff7/" class="nav-link">数据库</a></div><div class="nav-item"><a href="https://baidu.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  External
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>Linux</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/pages/85e331/" aria-current="page" class="active sidebar-link">Redhat 7 操作系统密码策略</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level2"><a href="/pages/85e331/#一、密码函数" class="sidebar-link">一、密码函数</a></li><li class="sidebar-sub-header level2"><a href="/pages/85e331/#二、密码策略" class="sidebar-link">二、密码策略</a></li></ul></li></ul></section></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-0c557b5e><div class="articleInfo" data-v-0c557b5e><ul class="breadcrumbs" data-v-0c557b5e><li data-v-0c557b5e><a href="/" title="首页" class="iconfont icon-home router-link-active" data-v-0c557b5e></a></li> <li data-v-0c557b5e><a href="/categories/?category=%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F" title="分类" data-v-0c557b5e>操作系统</a></li><li data-v-0c557b5e><a href="/categories/?category=Linux" title="分类" data-v-0c557b5e>Linux</a></li></ul> <div class="info" data-v-0c557b5e><!----> <div title="创建时间" class="date iconfont icon-riqi" data-v-0c557b5e><a href="javascript:;" data-v-0c557b5e>2022-03-31</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-title">目录</div> <div class="right-menu-content"></div></div></div> <h1><img src="">Redhat 7 操作系统密码策略<!----></h1> <!----> <div class="theme-vdoing-content content__default"><h1 id="redhat-centos-7-账户安全策略配置"><a href="#redhat-centos-7-账户安全策略配置" class="header-anchor">#</a> RedHat/Centos 7 账户安全策略配置</h1> <h2 id="一、密码函数"><a href="#一、密码函数" class="header-anchor">#</a> 一、密码函数</h2> <h3 id="_1、附件utlpwdmg-c2-sql-启用字母-数字的密码策略"><a href="#_1、附件utlpwdmg-c2-sql-启用字母-数字的密码策略" class="header-anchor">#</a> 1、附件utlpwdmg_c2.sql 启用字母+数字的密码策略</h3> <h3 id="_2、附件utlpwdmg-c3-sql-启用字母-数字-特殊字符的密码策略"><a href="#_2、附件utlpwdmg-c3-sql-启用字母-数字-特殊字符的密码策略" class="header-anchor">#</a> 2、附件utlpwdmg_c3.sql 启用字母+数字+特殊字符的密码策略</h3> <h3 id="_3、附件utlpwdmg-source-sql-默认密码策略"><a href="#_3、附件utlpwdmg-source-sql-默认密码策略" class="header-anchor">#</a> 3、附件utlpwdmg_source.sql 默认密码策略</h3> <h3 id="_4、恢复默认权限策略-alter-profile-default-limit-password-verify-function-null"><a href="#_4、恢复默认权限策略-alter-profile-default-limit-password-verify-function-null" class="header-anchor">#</a> 4、恢复默认权限策略：alter profile default limit password_verify_function null;</h3> <h2 id="二、密码策略"><a href="#二、密码策略" class="header-anchor">#</a> 二、密码策略</h2> <h3 id="_1、策略查询"><a href="#_1、策略查询" class="header-anchor">#</a> 1、策略查询</h3> <p>SELECT username,PROFILE FROM dba_users;</p> <h3 id="_2、查看指定概要文件-如default-的密码有效期"><a href="#_2、查看指定概要文件-如default-的密码有效期" class="header-anchor">#</a> 2、查看指定概要文件（如default）的密码有效期</h3> <div class="language-sql line-numbers-mode"><pre class="language-sql"><code><span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> dba_profiles s <span class="token keyword">WHERE</span> s<span class="token punctuation">.</span>profile<span class="token operator">=</span><span class="token string">'DEFAULT'</span> <span class="token operator">AND</span> resource_name<span class="token operator">=</span><span class="token string">'PASSWORD_LIFE_TIME'</span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="_3、策略调整-取消策略"><a href="#_3、策略调整-取消策略" class="header-anchor">#</a> 3、策略调整（取消策略）</h3> <div class="language-java line-numbers-mode"><pre class="language-java"><code>ALTER PROFILE DEFAULT LIMIT <span class="token class-name">PASSWORD_REUSE_TIME</span> UNLIMITED<span class="token punctuation">;</span>
ALTER PROFILE DEFAULT LIMIT <span class="token class-name">PASSWORD_LIFE_TIME</span> UNLIMITED<span class="token punctuation">;</span>
ALTER PROFILE DEFAULT LIMIT <span class="token class-name">PASSWORD_REUSE_MAX</span> UNLIMITED<span class="token punctuation">;</span>
ALTER PROFILE DEFAULT LIMIT <span class="token class-name">FAILED_LOGIN_ATTEMPTS</span> UNLIMITED<span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h3 id="_4、策略调整-生效策略"><a href="#_4、策略调整-生效策略" class="header-anchor">#</a> 4、策略调整（生效策略）</h3> <div class="language- line-numbers-mode"><pre class="language-text"><code>ALTER PROFILE DEFAULT LIMIT PASSWORD_REUSE_TIME 180;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME 90;
ALTER PROFILE DEFAULT LIMIT PASSWORD_REUSE_MAX 1;
ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS 3;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h3 id="_5、按值修改密码"><a href="#_5、按值修改密码" class="header-anchor">#</a> 5、按值修改密码</h3> <div class="language- line-numbers-mode"><pre class="language-text"><code>SELECT 'ALTER USER '||NAME||' IDENTIFIED BY VALUES '''||PASSWORD||''';' ALTER_USER FROM SYS.USER$ WHERE  NAME IN('OLAP_INTERFACE','OLAP_BI');
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div></div></div> <!----> <div class="page-edit"><!----> <!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2022/4/7 11:12:57</span></div></div> <div class="page-nav-wapper"><!----> <!----></div></div> <div class="article-list"><div class="article-title"><a href="/archives/" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/pages/0ff3bc/"><div>
            数据基础
            <!----></div></a> <span class="date">04-04</span></dt></dl><dl><dd>02</dd> <dt><a href="/pages/aa3ff7/"><div>
            Oracle19c静默安装部署
            <!----></div></a> <span class="date">04-01</span></dt></dl><dl><dd>03</dd> <dt><a href="/pages/3da17e/"><div>
            Git使用手册
            <!----></div></a> <span class="date">03-31</span></dt></dl> <dl><dd></dd> <dt><a href="/archives/" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><!----> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> <!----></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.6ab793bd.js" defer></script><script src="/assets/js/2.c1834578.js" defer></script><script src="/assets/js/10.551bf274.js" defer></script>
  </body>
</html>
